package request

type Video struct {
	Id           int    `gorm:"type:int;comment:'ID'"`
	Title        string `gorm:"type:varchar(30);not null;comment:'标题'"`
	Description  string `gorm:"type:varchar(50);not null;comment:'简介'"`
	CoverUrl     string `gorm:"type:varchar(100);not null;comment:'封面'"`
	CategoryId   int    `gorm:"type:int;not null;comment:'视频分类ID'"`
	TypeId       int    `gorm:"type:int;not null;comment:'视频类型ID'"`
	RegionId     int    `gorm:"type:int;not null;comment:'视频分类ID'"`
	Year         int    `gorm:"type:int;not null;comment:'发行年份'"`
	Actor        string `gorm:"type:varchar(50);not null;comment:'主演演员'"`
	Director     string `gorm:"type:varchar(50);not null;comment:'导演'"`
	PlayCount    int    `gorm:"type:int;not null;comment:'播放量'"`
	LikeCount    int    `gorm:"type:int;not null;comment:'点赞量'"`
	CollectCount int    `gorm:"type:int;not null;comment:'收藏量'"`
	CommentCount int    `gorm:"type:int;not null;comment:'评论量'"`
	Status       int    `gorm:"type:int;not null;comment:'审核状态'"`
}

// 视频审核表
type VideoReview struct {
	Id       int    `gorm:"type:int;comment:'ID'"`
	VideoId  int    `gorm:"type:int;not null;comment:'视频ID'"`
	Status   int    `gorm:"type:int;not null;comment:'审核状态 0-未审核 1-已审核 2-审核失败'"`
	Reason   string `gorm:"type:varchar(20);not null;comment:'审核原因'"`
	ReviewId int    `gorm:"type:int;not null;comment:'审核ID'"`
}

type Fen struct {
	Page int `json:"page"`
	Size int `json:"size"`
}

// 电视剧集表
type DramaEpisode struct {
	Id         int    `gorm:"type:int;comment:'ID'"`
	VideoId    int    `gorm:"type:int;not null;comment:'视频ID'"`
	EpisodeNum int    `gorm:"type:int;not null;comment:'剧集数'"`
	Title      string `gorm:"type:varchar(20);not null;comment:'剧集标题'"`
	Duration   int    `gorm:"type:int;not null;comment:'剧集时长'"`
}

// 观看历史表
type UserHistory struct {
	Id        int `gorm:"type:int;comment:'ID'"`
	UserId    int `gorm:"type:int;not null;comment:'用户ID'"`
	VideoId   int `gorm:"type:int;not null;comment:'视频ID'"`
	EpisodeId int `gorm:"type:int;not null;comment:'剧集ID'"`
	Progress  int `gorm:"type:int;not null;comment:'播放进度'"`
}

// 排行榜
type Ranking struct {
	Id           int     `gorm:"type:int;comment:'ID'"`
	Number       int     `gorm:"type:int;not null;comment:'序号'"`
	Title        string  `gorm:"type:varchar(20);not null;comment:'标题'"`
	CoverUrl     string  `gorm:"type:varchar(100);not null;comment:'封面'"`
	PlayCount    int     `gorm:"type:int;not null;comment:'播放量'"`
	LikeCount    int     `gorm:"type:int;not null;comment:'点赞量'"`
	CollectCount int     `gorm:"type:int;not null;comment:'收藏量'"`
	CommentCount int     `gorm:"type:int;not null;comment:'评论量'"`
	HeatValue    float64 `gorm:"type:decimal(10,2);not null;comment:'热度值'"`
}
